﻿<%@ Page Title="Crear equipo" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
	CodeBehind="Create.aspx.cs" Inherits="TraceThisItem.WebUI.Teams.Create" %>

<asp:Content ID="Head" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Body" ContentPlaceHolderID="MainContent" runat="server">
	<h2>
		Crear equipo</h2>
	<asp:DetailsView ID="TeamsDetailsView" runat="server" Height="50px" Width="125px"
		DefaultMode="Insert" DataSourceID="TeamDataSource" AutoGenerateRows="False" OnItemInserted="TeamsDetailsView_ItemInserted"
		OnItemCommand="TeamsDetailsView_ItemCommand">
		<Fields>
			<asp:BoundField DataField="Id" HeaderText="Id" SortExpression="Id" Visible="false" />
			<asp:BoundField DataField="Name" HeaderText="Nombre:" SortExpression="Name" />
			<asp:TemplateField HeaderText="Proyecto:" SortExpression="ProjectId">
				<InsertItemTemplate>
					<asp:DropDownList ID="ProjetDropDownList" runat="server" DataSourceID="ProjectDataSource"
						DataTextField="Name" DataValueField="Id" SelectedValue='<%# Bind("ProjectId") %>'>
					</asp:DropDownList>
				</InsertItemTemplate>
			</asp:TemplateField>
			<asp:CommandField ButtonType="Button" ShowInsertButton="True" />
		</Fields>
	</asp:DetailsView>
	<asp:ObjectDataSource ID="TeamDataSource" runat="server" DataObjectTypeName="TraceThisItem.Domain.Team"
		InsertMethod="AddTeam" SelectMethod="GetTeams" TypeName="TraceThisItem.Domain.Facade"
		OnObjectCreating="ObjectDataSource_ObjectCreating" />
	<asp:ObjectDataSource ID="ProjectDataSource" runat="server" OnObjectCreating="ObjectDataSource_ObjectCreating"
		SelectMethod="GetProjects" TypeName="TraceThisItem.Domain.Facade" />
</asp:Content>
